//
//  HeadTabBar.h
//  ebook
//
//  Created by 吴超飞 on 2016/11/25.
//  Copyright © 2016年 Moton. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "ChannelUnitModel.h"

#define kHeadTabBarHeight 44

@class HeadTabBar;
@protocol HeadTabBarDelegate <NSObject>

-(void)headTabBar:(HeadTabBar *)view didSelectedItem:(ChannelUnitModel *)item;
-(void)headTabBar:(HeadTabBar *)view addBtnClick:(UIButton *)addBtn;

@end

@interface HeadTabBar : UIView

@property (nonatomic, strong) NSArray<ChannelUnitModel *> *itemArray; //头顶列表的数据源
@property (nonatomic, weak  ) id<HeadTabBarDelegate>  delegate;

@property (nonatomic, assign) CGFloat itemMainWith; //每个item的最小宽度,默认为70
@property (nonatomic, assign) NSInteger selectedIndex; //当前选择的index
@property (nonatomic, strong) ChannelUnitModel *currentChanel; //当前菜单

//刷新视图
-(void)reloadData:(NSArray<ChannelUnitModel *> *)items currentChannel:(ChannelUnitModel *)channel;

@end
